package test.nothing.dao;

import java.io.File;

import org.appfuse.model.User;
import org.appfuse.dao.UserDao;
import org.appfuse.dao.BaseDaoTestCase;

public class DaoTestHelper extends BaseDaoTestCase {

    private UserDao userDao = null;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public User generateUser() throws Exception {
        User user = new User();
        user.setUsername("mick");
        user.setPassword("nowt");
        user.setFirstName("Mick");
        user.setLastName("Carter");
        user.setEmail("cick.marter@gmail.com");
        user.getAddress().setCity("Nottingham");
        user.getAddress().setPostalCode("NG3 1FU");
        user = userDao.save(user);
        return user;
    }
   
    public static File getPictureFile(){
          return new File("/home/mick/work/munch/images/duveljam.jpg");
    }

}
